<?php
class Anchor extends Renderable {
	
	private $destination;
	private $text;
	
	public function __construct($text, $destination, $elementId = NULL) {
	
		parent::__construct($elementId);
	
		$this->text = $text;
		$this->destination = $destination;
	}
	
	protected function renderElement() {
		
		echo '<a href="', $this->destination, '"', $this->formatAttributes(), '>', $this->text, '</a>';
	}
}
?>